// 封装请求品牌分类的方法

import requestPro from "@/utils/http/requestPro";
import { trademarkItemType, trademarkPagesType } from "./model/trademarkType";
const request = requestPro;
//请求分页列表
export const reqTrademarkList = (page: number, limit: number) => {
  return request.get<any, trademarkPagesType>(
    `/admin/product/baseTrademark/${page}/${limit}`
  );
};

//添加一个品牌
export const reqAddTrademark = (tmName: string, logoUrl: string) => {
  return request.post<any, null>(`/admin/product/baseTrademark/save`, {
    tmName,
    logoUrl,
  });
};

// 修改一个品牌
export const reqUpdataTrademark = (tmInfo: trademarkItemType) => {
  return request.put<any, null>("/admin/product/baseTrademark/update", tmInfo);
};

// 删除一个品牌
export const reqDeleteTrademark = (id: number) => {
  return request.delete<any, null>(`/admin/product/baseTrademark/remove/${id}`);
};
